package com.liuyucheng.designpattern.单例模式;

/**
 * 延迟加载获取对象同时保证线程安全的另一种实现
 * 静态内部类
 */
public class Singleton3 {
    private static class Inner{
        private static final Singleton3 single = new Singleton3();
    }

    public static Singleton3 getInstance(){
        return Inner.single;
    }

}
